<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    
    <script type="text/javascript">
    	function check(){
    		
    		var sp_number = document.getElementById("sp_number").value;
     		if("" == sp_number){
     			alert("请选择业务长号码");
     			return false;
     		}
     		
    		var day_price = document.getElementById("day_price").value;
     		if("" == day_price){
     			alert("请输入单日金额限制");
     			return false;
     		}
     		
     		var month_price = document.getElementById("month_price").value;
     		if("" == month_price){
     			alert("请输入单月金额限制");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="editLimitUserConsumForm" name="editLimitUserConsumForm" method="post" action="${path }/limitUserConsum/updateLimitUserConsum.action" onsubmit="return check();">
    		<p>填写自消费用户总量限制信息</p>
    		<c:choose>
    			<c:when test="${limitUserConsumVo.id == null}">
    				<input type="hidden" name="limitUserConsumVo.id" value="0" />
    			</c:when>
    			<c:otherwise>
    				<input type="hidden" name="limitUserConsumVo.id" value="${limitUserConsumVo.id }" />
    			</c:otherwise>
    		</c:choose>
    		<table>
    			<tr>
    				<td>业务长号码</td>
    				<td>
    					<select id="sp_number" name="limitUserConsumVo.sp_number">
    						<option value="">--请选择--</option>
    						<c:if test="${consumSpnumberList != null && fn:length(consumSpnumberList) > 0 }">
    							<c:forEach items="${consumSpnumberList }" var="spnumber" varStatus="i">
    								<option value="${spnumber }" <c:if test="${spnumber eq limitUserConsumVo.sp_number }">selected="selected"</c:if>>${spnumber }</option>
    							</c:forEach>
    						</c:if>
    					</select>
    					<span style="color: red;size: 2px;">&nbsp;*必选项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>单日金额限制(元)</td>
    				<td>
    					<input type="text" id="day_price" name="limitUserConsumVo.day_price" value="${limitUserConsumVo.day_price }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>单月金额限制(元)</td>
    				<td>
    					<input type="text" id="month_price" name="limitUserConsumVo.month_price" value="${limitUserConsumVo.month_price }" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="submit" name="submit" value="确认" />
    				</td>
    			</tr>
    		</table>
    	</form>
    </div>
  </body>
</html>